Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on publish #79

Merged
merged 2 commits into from
Feb 26, 2025
Merged

Build on publish #79

merged 2 commits into from
Feb 26, 2025

Conversation

keithamus
Copy link
Member

In #75 we switched from karma to wtr; and as part of that the test & pretest scripts changed:

- "pretest": "npm run build",
+ "pretest": "npm run lint && npm run check",
- "test": "npm run lint && karma start test/karma.config.cjs",
+ "test": "wtr",

We switched from needing to build the package to run tests, to instead using wtr's ability to transpile typescript just in time. This results in faster tests, as there's less work to do beforehand, and so we can confidently drop the npm run build pretest script.

However, our publish pipeline incidentally relied on build being implicitly run. Consequently, when we released 4.2.0 it doesn't include lib like it's supposed to, rendering the package unusable.

This PR adds npm run build back into the publish pipeline as an explicit step, so that lib is included in the package again. We should release this as 4.2.1.

@Copilot Copilot bot review requested due to automatic review settings February 26, 2025 09:51
@keithamus keithamus requested a review from a team as a code owner February 26, 2025 09:51
@keithamus keithamus requested a review from arelia February 26, 2025 09:51
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR addresses the issue of missing built artifacts (the lib directory) in the published package by explicitly adding a build step to the publish pipeline.

  • Added "npm run build" as a step in the publish workflow
  • Ensures that the package includes the built lib directory before publishing

Reviewed Changes

File Description
.github/workflows/publish.yml Added explicit "npm run build" step to include lib in publish

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@keithamus keithamus enabled auto-merge February 26, 2025 09:52
@keithamus keithamus merged commit e540a78 into main Feb 26, 2025
5 checks passed
@keithamus keithamus deleted the build-on-publish branch February 26, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants